package com.qige.homework;

public class day16_homework2 {
    public static void main(String[] args) {
        Star star = new Star();
        star.shine();
        System.out.println("======================");
        Sun sun = new Sun();
        sun.doAnything();
        Star star1 = new Sun();
        star1.shine();
    }
}
interface Universe{
    abstract void doAnything();
}
class Star{
    public void shine(){
        System.out.println("Star:星星一闪一闪亮晶晶");
    }
}
class Sun extends Star implements Universe{
    @Override
    public void doAnything() {
        System.out.println("sun:太阳吸引着9大行星旋转");
    }
    @Override
    public void shine() {
        System.out.println("sun:光照八分钟，到达地球");
    }
}